package com.hist.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hist.entity.AllScore;
import com.hist.entity.Percent;
import com.hist.entity.Student;
import com.hist.service.TeacherService;

@Controller
public class TeacherController {

	    @Autowired
	    TeacherService service;
	    /*录入学生成绩*/
	    @ResponseBody
		@RequestMapping("/insertScore")
	    public void insertScore(Integer sno,Integer cno,Double score)
	    {
			service.insertScore(sno,cno,score);
	    }
	   @ResponseBody
	   @RequestMapping("/percent")
	   public List<Percent> getPercent(String smajor,Integer sgrade)
	   {
		   return service.getPercent(smajor,sgrade);
	   }
	   
	   @ResponseBody
	   @RequestMapping("/allscore")
	   public List<AllScore> allScore()
	   {
		   return service.allScore();
	   }
	   
	   @ResponseBody
	   @RequestMapping("/majorScore")
	   public List<AllScore> majorScore(String smajor,Integer sgrade)
	   {
		   return service.majorScore(smajor,sgrade);
	   }
	   
	  
}
